/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package backend;

/**
 *
 * @author Admin
 */
public class Category extends Object{
    private String catID;
    
    public Category(String catID){
        this.catID=catID;
    }
       
    public String getID(){
        return this.catID;
    }

    @Override
    public String toString(){
        return catID;
    }

    @Override
    public boolean equals(Object o){
        if(o instanceof Category){
            return ((Category)o).getID().equals(this.catID);
        }
        return false;
    }

    @Override
    public int hashCode() {
        return (int) Math.pow(2, Integer.parseInt(catID));
    }

}
